import 'package:dio/dio.dart';
import 'package:study_online/global/Global.dart';
import 'package:study_online/utils/rsa.dart';

Future loginModel(String sno, String pwd) async {
  return await Global.getInstance().dio.post(
    "/stu/login",
    queryParameters: {
      "stuId": sno,
      "pwd": pwd,
    },
  );
}

Future getUserAllInfoById(String sno) async {
  return await Global.getInstance().dio.get(
    "/stu/getUserInfo",
    queryParameters: {
      "stuId": sno,
    },
  );
}

Future registerModel(String tel, String sno,String pwd) async {
  return await Global.getInstance().dio.post(
    "/stu/register",
    queryParameters: {
      "phone": tel,
      "stuId": sno,
      "pwd": encodeString(pwd),
    },
  );
}